#pragma once

#include<string>
#include"tokenizer.h"
#include"comment.h"

struct Symbol
{
    std::string m_sName;
    std::string m_sTypePrefix;
    std::string m_sTypeSuffix;

    Symbol(std::string sName, std::string sTypePrefix="", std::string sTypeSuffix="")
    {
        m_sName = sName;
        m_sTypePrefix = sTypePrefix;
        m_sTypeSuffix = sTypeSuffix;
    }
};

struct Scope
{
    enum Type;
public:
    //TODO Change to private
    Scope::Type m_eType;
    std::vector<std::string> m_asWorkspace;
    std::vector<std::string> m_asSubstream;
    std::vector<Scope*> m_apxChildren;
    Scope* m_pxParent;
    Comment m_xComment;

protected:
    int m_iSubstreamElement;
    
public:
    Scope();
    ~Scope();
    void dump();
    virtual Scope* process(Token& inToken, bool &bIsEndOfScope);
    //Note: bIsEndofScope = true and non-null return illegal.
    Scope* detectComment(char inCharacter);
    Scope::Type  getScopeType();

public:
    enum Type
    {
        eScopeInvalid=0,
        eScopeGlobal,
        eScopeParen,
        eScopeCommentC,
        eScopeCommentCPP,
        eScopeBlock,
        eScopeBracket,
        eScopePreprocessor, //FIXME Remove this. This is actually intelligence?
        eScopeLiteral
    };
};
